{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn import svm\n",
    "svc = svm.SVC(gamma=0.001, C=100.)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn import datasets\n",
    "\n",
    "digits = datasets.load_digits()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Optical Recognition of Handwritten Digits Data Set\n",
      "===================================================\n",
      "\n",
      "Notes\n",
      "-----\n",
      "Data Set Characteristics:\n",
      "    :Number of Instances: 5620\n",
      "    :Number of Attributes: 64\n",
      "    :Attribute Information: 8x8 image of integer pixels in the range 0..16.\n",
      "    :Missing Attribute Values: None\n",
      "    :Creator: E. Alpaydin (alpaydin '@' boun.edu.tr)\n",
      "    :Date: July; 1998\n",
      "\n",
      "This is a copy of the test set of the UCI ML hand-written digits datasets\n",
      "http://archive.ics.uci.edu/ml/datasets/Optical+Recognition+of+Handwritten+Digits\n",
      "\n",
      "The data set contains images of hand-written digits: 10 classes where\n",
      "each class refers to a digit.\n",
      "\n",
      "Preprocessing programs made available by NIST were used to extract\n",
      "normalized bitmaps of handwritten digits from a preprinted form. From a\n",
      "total of 43 people, 30 contributed to the training set and different 13\n",
      "to the test set. 32x32 bitmaps are divided into nonoverlapping blocks of\n",
      "4x4 and the number of on pixels are counted in each block. This generates\n",
      "an input matrix of 8x8 where each element is an integer in the range\n",
      "0..16. This reduces dimensionality and gives invariance to small\n",
      "distortions.\n",
      "\n",
      "For info on NIST preprocessing routines, see M. D. Garris, J. L. Blue, G.\n",
      "T. Candela, D. L. Dimmick, J. Geist, P. J. Grother, S. A. Janet, and C.\n",
      "L. Wilson, NIST Form-Based Handprint Recognition System, NISTIR 5469,\n",
      "1994.\n",
      "\n",
      "References\n",
      "----------\n",
      "  - C. Kaynak (1995) Methods of Combining Multiple Classifiers and Their\n",
      "    Applications to Handwritten Digit Recognition, MSc Thesis, Institute of\n",
      "    Graduate Studies in Science and Engineering, Bogazici University.\n",
      "  - E. Alpaydin, C. Kaynak (1998) Cascading Classifiers, Kybernetika.\n",
      "  - Ken Tang and Ponnuthurai N. Suganthan and Xi Yao and A. Kai Qin.\n",
      "    Linear dimensionalityreduction using relevance weighted LDA. School of\n",
      "    Electrical and Electronic Engineering Nanyang Technological University.\n",
      "    2005.\n",
      "  - Claudio Gentile. A New Approximate Maximal Margin Classification\n",
      "    Algorithm. NIPS. 2000.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print(digits.DESCR)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  0.,   0.,   5.,  13.,   9.,   1.,   0.,   0.],\n",
       "       [  0.,   0.,  13.,  15.,  10.,  15.,   5.,   0.],\n",
       "       [  0.,   3.,  15.,   2.,   0.,  11.,   8.,   0.],\n",
       "       [  0.,   4.,  12.,   0.,   0.,   8.,   8.,   0.],\n",
       "       [  0.,   5.,   8.,   0.,   0.,   9.,   8.,   0.],\n",
       "       [  0.,   4.,  11.,   0.,   1.,  12.,   7.,   0.],\n",
       "       [  0.,   2.,  14.,   5.,  10.,  12.,   0.,   0.],\n",
       "       [  0.,   0.,   6.,  13.,  10.,   0.,   0.,   0.]])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "digits.images[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1797"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "digits.target.size"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 1, 2, ..., 8, 9, 8])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "digits.target"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x23ffe44c2b0>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPgAAAD8CAYAAABaQGkdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAACtlJREFUeJzt3V9onfUdx/HPZ1HZ/FOsazekqYsB\nKchgtoaCFITVZdQpuospLShMBr1SlA2s7m53eiPuYghSdYKd0lQFEacTVJywOZO226ypo60dzapr\nyir+GaxUv7vIKXRdtjzp+T1/ztf3C4L5c8jve4jvPs85OXl+jggByOlLbQ8AoD4EDiRG4EBiBA4k\nRuBAYgQOJEbgQGIEDiRG4EBiZ9XxTZctWxYjIyN1fOtWHTt2rNH1ZmZmGltryZIlja01PDzc2FpD\nQ0ONrdWkgwcP6ujRo17odrUEPjIyosnJyTq+dasmJiYaXW/Lli2NrTU+Pt7YWvfdd19jay1durSx\ntZo0NjZW6XacogOJETiQGIEDiRE4kBiBA4kROJAYgQOJETiQWKXAbW+w/a7tfbbvqXsoAGUsGLjt\nIUm/kHStpMslbbJ9ed2DAehflSP4Wkn7IuJARByX9JSkG+sdC0AJVQJfIenQKR/P9D4HoOOqBD7f\nX6z818XUbW+2PWl7cnZ2tv/JAPStSuAzklae8vGwpMOn3ygiHo6IsYgYW758ean5APShSuBvSbrM\n9qW2z5G0UdJz9Y4FoIQF/x48Ik7Yvl3SS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AAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23ffd8cf9e8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "\n",
    "plt.imshow(digits.images[0], cmap=plt.cm.gray_r, interpolation='nearest')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "SVC(C=100.0, cache_size=200, class_weight=None, coef0=0.0,\n",
       "  decision_function_shape='ovr', degree=3, gamma=0.001, kernel='rbf',\n",
       "  max_iter=-1, probability=False, random_state=None, shrinking=True,\n",
       "  tol=0.001, verbose=False)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "svc.fit(digits.data[1:1790], digits.target[1:1790])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x23fff917128>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARUAAAD8CAYAAABZ0jAcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAD7FJREFUeJzt3T9sVGf2xvHnrFdIKEImwsZFEjwo\nSoqVIuAniwZpgSIRW5kyqWIaNxsJp0sHdOmAIkVQlJgmSsefAiVQBGgZK0b5I4IQsRXLBQYJiygF\nAp0tMJF/i/d978w978y1+X4asM947lE4eXTn3tfvNXcXAET5W78bALCxECoAQhEqAEIRKgBCESoA\nQhEqAEIRKgBCESoAQhEqAEL9vcSbDg0NeavVKvHWkqQ///wz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RfNbLukK2Z2y92vr37Byj/IpCTt2LEj\nuE2gmORsM9edq3Sm4u6LK3/ek3RO0t41XnPG3cfcfWx4eDi2S6CQ3Gwz153LhoqZvWJmW57/XdJ7\nkn4q3RhQGrNdRpWPPyOSzq3chv27pK/d/duiXQG9wWwXkA0Vd78raVcPevlL7n5/6ef+4OUQPdt1\n9/HJ/Xzd9VO92m+FW8oAQhEqAEIRKgBCESoAQhEqAEIRKgBCESoAQvXluT85y8vLyXruuUC5fSv2\n79+frLOfCroxNTVV6+dz61Ry9dxc1+2vKs5UAIQiVACEIlQAhCJUAIQiVACEIlQAhCJUAIQyd49/\nU7MlSfOrvjUkqcmPQIjub9Td2Xtwg2Guq811kVB54SBm7dIPIKuj6f2hmZo+N/3qj48/AEIRKgBC\n9SpUzvToON1qen9opqbPTV/668k1FQAvDz7+AAhVNFTM7JCZ/Wpmd8zsk5LH6oaZzZnZj2Y2a2bt\nfveD9YPZThy71McfMxuQdFvSu5IWJN2Q9IG7/1LkgF0wszlJY+7e5LUGaBhmO63kmcpeSXfc/a67\nP5b0jaTxgscDeoXZTigZKq9J+n3V1wsr32sSl3TZzGbMbLLfzWDdYLYTSm4naWt8r2m3mva5+6KZ\nbZd0xcxuufv1fjeFxmO2E0qeqSxIemPV169LWix4vI65++LKn/ckndOz01ogh9lOKBkqNyS9ZWY7\nzWyTpPclXSx4vI6Y2StmtuX53yW9J+mn/naFdYLZTij28cfdn5jZR5K+kzQg6Ut3/7nU8bowIumc\nmUnP/jt87e7f9rclrAfMdhoragGEYkUtgFCECoBQhAqAUIQKgFCECoBQhAqAUIQKgFCECoBQ/wFn\nQisVx9/KEAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23ffe417cf8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "\n",
    "plt.subplot(321)\n",
    "plt.imshow(digits.images[1791], cmap=plt.cm.gray_r, interpolation='nearest')\n",
    "plt.subplot(322)\n",
    "plt.imshow(digits.images[1792], cmap=plt.cm.gray_r, interpolation='nearest')\n",
    "plt.subplot(323)\n",
    "plt.imshow(digits.images[1793], cmap=plt.cm.gray_r, interpolation='nearest')\n",
    "plt.subplot(324)\n",
    "plt.imshow(digits.images[1794], cmap=plt.cm.gray_r, interpolation='nearest')\n",
    "plt.subplot(325)\n",
    "plt.imshow(digits.images[1795], cmap=plt.cm.gray_r, interpolation='nearest')\n",
    "plt.subplot(326)\n",
    "plt.imshow(digits.images[1796], cmap=plt.cm.gray_r, interpolation='nearest')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([4, 9, 0, 8, 9, 8])"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "svc.predict(digits.data[1791:1976])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([4, 9, 0, 8, 9, 8])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "digits.target[1791:1976]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "# Deep Learning"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Extracting MNIST_data/train-images-idx3-ubyte.gz\n",
      "Extracting MNIST_data/train-labels-idx1-ubyte.gz\n",
      "Extracting MNIST_data/t10k-images-idx3-ubyte.gz\n",
      "Extracting MNIST_data/t10k-labels-idx1-ubyte.gz\n"
     ]
    }
   ],
   "source": [
    "mnist = read_data_sets (\"MNIST_data/\", one_hot=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<tensorflow.contrib.learn.python.learn.datasets.mnist.DataSet at 0x23f850f5940>"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mnist.train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "list of values loaded  [2 6 8 3 4 2 0 9 8 7]\n"
     ]
    }
   ],
   "source": [
    "pixels,real_values = mnist.train.next_batch(10)\n",
    "print(\"list of values loaded \",real_values)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "list of values loaded  [6 7 1 1 6 6 2 0 8 3]\n"
     ]
    }
   ],
   "source": [
    "pixels,real_values = mnist.train.next_batch(10)\n",
    "print(\"list of values loaded \",real_values)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP8AAAD8CAYAAAC4nHJkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAADCZJREFUeJzt3VGonGedx/Hvf7t6U71oyWkNNfW4\nUpYthY3LEIQumwSp1EVIvbCYC8mCGC8srOCFJTc5uVgosur2YhGiDaagVUG7zUXZtZTTdoVFOi3F\nVrO7lnJWY0JyQgXrlbT578V5I8f0nJnpzPvOOyf/7wfCzLzvO/P+ecnvP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23/VJRhl8qqu/wn+z5/KMsam2LWhdY27R6qa3Xz/yS+tN3yy+pJ72EPyLu\njYj/iYhXI+LBPmrYTkSsRcTLEfFSRPQ6/rhZBu1SRLyyadvNEfFURPyyud1ymbSealuJiN801+6l\niPj7nmrbExGrEXE2In4eEf/YbO/12o2oq5frNve3/RFxA/C/wD3AOeB54HBm/mKuhWwjItaAQWb2\n3iccEX8H/B54NDPvarZ9BXg9Mx9q/nDelJlfXpDaVoDf971yc7OgzO7NK0sD9wH/QI/XbkRd99PD\ndeuj5d8HvJqZr2XmH4DvAYd6qGPhZeZzwOvXbD4EnG7un2bjP8/cbVPbQsjMC5n5YnP/DeDqytK9\nXrsRdfWij/DfBvx60+NzLNaS3wn8OCJeiIijfRezhVubZdOvLp9+S8/1XGvsys3zdM3K0gtz7aZZ\n8bptfYR/qymGFqnL4e7M/Bvg48AXmre3msxEKzfPyxYrSy+EaVe8blsf4T8H7Nn0+P3A+R7q2FJm\nnm9uLwGPs3irD1+8ukhqc3up53r+aJFWbt5qZWkW4Not0orXfYT/eeCOiPhgRLwb+DRwpoc63iYi\nbmy+iCEibgQ+xuKtPnwGONLcPwI80WMtf2JRVm7ebmVper52i7bidS8/8mm6Mv4FuAE4lZn/NPci\nthARf8FGaw8bi5h+t8/aIuIx4AAbo74uAseBfwN+ANwO/Ar4VGbO/Yu3bWo7wMZb1z+u3Hz1M/ac\na/tb4D+Bl4ErzeZjbHy+7u3ajajrMD1cN3/hJxXlL/ykogy/VJThl4oy/FJRhl8qyvBLRRl+qSjD\nLxX1/yjHpgZPHDEkAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23f84e20ba8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "image = np.reshape(pixels[1,:],[28,28])\n",
    "plt.imshow(image, cmap=plt.cm.gray_r, interpolation='nearest')\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Extracting MNIST_data/train-images-idx3-ubyte.gz\n",
      "Extracting MNIST_data/train-labels-idx1-ubyte.gz\n",
      "Extracting MNIST_data/t10k-images-idx3-ubyte.gz\n",
      "Extracting MNIST_data/t10k-labels-idx1-ubyte.gz\n",
      "Epoch: 0001 cost= 1.176361134\n",
      "Epoch: 0002 cost= 0.662538510\n",
      "Epoch: 0003 cost= 0.550689667\n",
      "Epoch: 0004 cost= 0.496738935\n",
      "Epoch: 0005 cost= 0.463713668\n",
      "Epoch: 0006 cost= 0.440845339\n",
      "Epoch: 0007 cost= 0.423968329\n",
      "Epoch: 0008 cost= 0.410662182\n",
      "Epoch: 0009 cost= 0.399876185\n",
      "Epoch: 0010 cost= 0.390923975\n",
      "Epoch: 0011 cost= 0.383305770\n",
      "Epoch: 0012 cost= 0.376747700\n",
      "Epoch: 0013 cost= 0.371062683\n",
      "Epoch: 0014 cost= 0.365925885\n",
      "Epoch: 0015 cost= 0.361331244\n",
      "Epoch: 0016 cost= 0.357197133\n",
      "Epoch: 0017 cost= 0.353523670\n",
      "Epoch: 0018 cost= 0.350157993\n",
      "Epoch: 0019 cost= 0.347037680\n",
      "Epoch: 0020 cost= 0.344143576\n",
      "Epoch: 0021 cost= 0.341464736\n",
      "Epoch: 0022 cost= 0.338996708\n",
      "Epoch: 0023 cost= 0.336639690\n",
      "Epoch: 0024 cost= 0.334515039\n",
      "Epoch: 0025 cost= 0.332482831\n",
      "Training phase finished\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAHaBJREFUeJzt3X14FPX57/H3LUklVQpSqALBgq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OA7cAJwGbIzejPAtIlcX\nAzwP3OvuWUSuQK1Yvwj4mbv3AS4kcgMziNzxcjpwPnAOcFHoByUSo7REFyDSDA0DBgAboh/iM4jc\ndO0z4OXoNi8AS82sLdDO3d+Krl8I/CZ6f6ou7v4qgLsfBYjub727F0eXC4FuwDvhH5ZI3RQKIicz\nYKG7zzphpdn/rLJdbfeIqa1L6JNKPx9Hf4fSjKj7SORka4DxZvYlCL4T+MtE/l7GR7eZALzj7mXA\nh2Z2cXT9jcBb0XvfF5vZ2Og+TjWzz8f1KEQaQJ9QRKpw921mdj+Rb7c7BTgG3AV8BPQ0s3ygjMi4\nA0Ru3zw/+qa/G7gluv5G4JdmNie6j2vieBgiDaK7pIrEyMwOu/vpia5DJEzqPhIRkYBaCiIiElBL\nQUREAgoFEREJKBRERCSgUBARkYBCQUREAgoFEREJ/H+xdqJ0yV1gDAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23f86535dd8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model accuracy: 0.9143\n"
     ]
    }
   ],
   "source": [
    "from tensorflow.examples.tutorials.mnist import input_data\n",
    "mnist = input_data.read_data_sets(\"MNIST_data/\", one_hot=True)\n",
    "\n",
    "import tensorflow as tf\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# Parameters\n",
    "learning_rate = 0.01\n",
    "training_epochs = 25\n",
    "batch_size = 100\n",
    "display_step = 1\n",
    "\n",
    "# tf Graph Input\n",
    "x = tf.placeholder(\"float\", [None, 784]) # mnist data image of shape 28*28=784\n",
    "y = tf.placeholder(\"float\", [None, 10]) # 0-9 digits recognition => 10 classes\n",
    "\n",
    "# Create model\n",
    "\n",
    "# Set model weights\n",
    "W = tf.Variable(tf.zeros([784, 10]))\n",
    "b = tf.Variable(tf.zeros([10]))\n",
    "\n",
    "evidence = tf.matmul(x, W) + b\n",
    "\n",
    "# Construct model\n",
    "activation = tf.nn.softmax(evidence) # Softmax\n",
    "\n",
    "# Minimize error using cross entropy\n",
    "cross_entropy = y*tf.log(activation)\n",
    "cost = tf.reduce_mean(-tf.reduce_sum(cross_entropy,reduction_indices=1))\n",
    "\n",
    "optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost) \n",
    "\n",
    "#Plot settings\n",
    "avg_set = []\n",
    "epoch_set=[]\n",
    "\n",
    "# Initializing the variables\n",
    "init = tf.global_variables_initializer()\n",
    "\n",
    "# Launch the graph\n",
    "with tf.Session() as sess:\n",
    "    sess.run(init)\n",
    "\n",
    "    # Training cycle\n",
    "    for epoch in range(training_epochs):\n",
    "        avg_cost = 0.\n",
    "        total_batch = int(mnist.train.num_examples/batch_size)\n",
    "        # Loop over all batches\n",
    "        for i in range(total_batch):\n",
    "            batch_xs, batch_ys = mnist.train.next_batch(batch_size)\n",
    "            sess.run(optimizer, feed_dict={x: batch_xs, y: batch_ys})\n",
    "            avg_cost += sess.run(cost, feed_dict={x: batch_xs, y: batch_ys})/total_batch\n",
    "        if epoch % display_step == 0:\n",
    "            print(\"Epoch:\", '%04d' % (epoch+1), \"cost=\", \"{:.9f}\".format(avg_cost))\n",
    "        avg_set.append(avg_cost)\n",
    "        epoch_set.append(epoch+1)\n",
    "    print(\"Training phase finished\")\n",
    "\n",
    "    plt.plot(epoch_set,avg_set, 'o', label='Logistic Regression Training phase')\n",
    "    plt.ylabel('cost')\n",
    "    plt.xlabel('epoch')\n",
    "    plt.legend()\n",
    "    plt.show()\n",
    "\n",
    "    # Test model\n",
    "    correct_prediction = tf.equal(tf.argmax(activation, 1), tf.argmax(y, 1))\n",
    "    # Calculate accuracy\n",
    "    accuracy = tf.reduce_mean(tf.cast(correct_prediction, \"float\"))\n",
    "    print(\"Model accuracy:\", accuracy.eval({x: mnist.test.images, y: mnist.test.labels}))\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
